#ifndef OA_VIDEO_WINDOW_H
#define OA_VIDEO_WINDOW_H

#include "libs.h"
#include "util.h"
#include "../3rd party/glfw-2.6/glfw/include/GL/glfw.h"
#include "core/event.h"

namespace video {
	class Window:
		public util::Named
	{
	public:
		virtual ~Window();

		enum eScreenAspect {
			NORMAL_SCREEN = 1, // 4:3 aspect
			WIDE_SCREEN, // 16:9 aspect
			UNKNOWN_SCREEN
		};

		eScreenAspect getScreenAspectType() const;
		float getScreenAspectRatio() const;

	protected:
		friend class Video;
		
		Window(const std::string& name);

		void create();
		void destroy();

	private:
		/** configured stuff **/
		unsigned int mHeight;
		unsigned int mWidth;

		unsigned int mRedBits;
		unsigned int mGreenBits;
		unsigned int mBlueBits;
		unsigned int mAlphaBits;

		unsigned int mDepthBits;
		unsigned int mStencilBits;

		bool mFullscreen;
		bool mAutoSizeWindow; //when set to true, the window will automagically be the desktop resolution

		std::string mTitle;

		/** detected stuff **/
		GLFWvidmode mDesktopMode;
		float mScreenAspectRatio;		
		eScreenAspect mScreenAspectType; //should be one of the eScreenAspect values
	};
}

#endif
